package peng.dao;

import org.apache.ibatis.annotations.Param;
import peng.entity.AdminUserGroupMenuKey;

import java.util.List;

public interface AdminUserGroupMenuMapper {
    /**
     * 删除单个权限
     * @return
     */
    int deleteByPrimaryKey(@Param("gid") Integer gid ,@Param("mid") Integer mid);

    /**
     * 删除角色下的所有权限
     * @return
     */
    int deleteGroupMen(@Param("gid") Integer gid);

    int insert(AdminUserGroupMenuKey record);

    /**
     * 添加角色权限
     * @param record
     * @return
     */
    int insertSelective(AdminUserGroupMenuKey record);

    /**
     * 修改角色权限
     * @param mid
     * @param gid
     * @param newMid
     * @return
     */
    int updateSelective(@Param("mid")Integer mid, @Param("gid")Integer gid,@Param("newMid")Integer newMid);

    List<AdminUserGroupMenuKey> showlist(Integer gid);

}